|
RAIS
3.2
|
00001 00028 using System; 00029 using System.Data; 00030 using System.Collections.Generic; 00031 using System.Text; 00032 00033 namespace RAIS.Common.Localization 00034 { 00038 [Serializable] 00039 public class Culture : DBObject 00040 { 00041 #region Fields 00042 string englishName; 00043 int lcid; 00044 bool rightToLeft = false; 00045 #endregion 00046 #region Properties 00047 00050 new public int ID 00051 { 00052 get { return this.id; } 00053 } 00057 new public string Name 00058 { 00059 get { return this.name; } 00060 } 00064 public string EnglishName 00065 { 00066 get { return this.englishName; } 00067 } 00071 public bool RightToLeft 00072 { 00073 get { return this.rightToLeft; } 00074 set { this.rightToLeft = value; } 00075 } 00079 public int LCID 00080 { 00081 get { return this.lcid; } 00082 } 00083 #endregion 00084 #region Constructors 00085 public Culture() 00086 { } 00087 public Culture(int lcid) 00088 { 00089 System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(lcid); 00090 this.id = lcid; 00091 this.name = culture.NativeName; 00092 this.englishName = culture.EnglishName; 00093 this.lcid = lcid; 00094 } 00095 public Culture(IDataRecord record) 00096 { 00097 this.id = (int)record["PK Supported Language ID"]; 00098 this.name = record["Supported Language Name"].ToString(); 00099 this.englishName = record["Supported Language English Name"].ToString(); 00100 this.rightToLeft = (bool)record["Right To Left"]; 00101 this.lcid = (int)record["PK Supported Language ID"]; 00102 } 00103 #endregion 00104 } 00105 }